<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <link href="https://cdn.bootcss.com/twitter-bootstrap/3.0.1/css/bootstrap.min.css" rel="stylesheet">
    <title>订单详情</title>
    <link rel="stylesheet" href="/sell/css/style.css">
</head>
<body>
<div id="wrapper" class="toggled">
    <#-- side bar 侧边栏-->
        <#include "../common/nav.ftl">
        <#--主要内容-->
    <div id="page-content-wrapper">
        <div class="container">
            <div class="row clearfix">

                <p><h3>订单总额</h3></p>
                <div class="col-md-6 column">
                    <table class="table table-bordered table-hover table-condensed">
                        <thead>
                        <tr>
                            <th>订单号</th>
                            <th>总金额</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>${orderDTO.orderId}</td>
                            <td>${orderDTO.orderAmount}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>

            <#--订单详情-->
                <div class="col-md-12 column">

                    </thead> <br>
                    <p><h3>订单详情页</h3></p>
                    <table class="table table-bordered table-hover table-condensed">
                        <thead>
                        <tr>
                            <th>商品ID</th>
                            <th>商品名称</th>
                            <th>价格</th>
                            <th>数量</th>
                            <th>商品总金额</th>
                        </tr>
                        <tbody>
                        <#-- 在 行外 开始循环-->
                <#list orderDTO.orderDetailList as detail>

                <tr>
                    <td>${detail.productId}</td>
                    <td>${detail.productName}</td>
                    <td>${detail.productPrice}</td>
                    <td>${detail.productQuantity}</td>
                    <td>${detail.productQuantity * detail.productPrice}</td>
                </tr>

                </#list>
                        </tbody>
                    </table>
                </div>

            <#--操作按钮-->
                <div class="container">
                    <div class="row clearfix">
                        <div class="col-md-12 column">
                        <#--按钮的出现 有一定的条件的   - 新订单才出现 -->
                        <#--<#if orderDTO.getOrderStatusEnum().getMsg() == "等待支付"> </#if>-->
                            <a href="/sell/seller/order/finish?orderId=${orderDTO.orderId}" type="button" class="btn btn-default btn-success">完结订单</a>

                    <#if orderDTO.getOrderStatusEnum().getMsg() == "新订单">
                        <a href="/sell/seller/order/cancel?orderId=${orderDTO.orderId}" type="button" class="btn btn-default btn-danger">取消订单</a>
                    </#if>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>





</body>
</html>